package com.leo.study.mybatis.service.impl;

import com.leo.study.mybatis.mapper.AdminMapper;
import com.leo.study.mybatis.pojo.Admin;
import com.leo.study.mybatis.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author liusl
 * @date 2019/1/21-16:40
 */
@Service
public class AdminServiceImpl implements AdminService {

    private final AdminMapper adminMapper;

    @Autowired
    public AdminServiceImpl(AdminMapper adminPOMapper) {
        this.adminMapper = adminPOMapper;
    }


    @Override
    public Admin getById(Long id) {
        return adminMapper.selectByPrimaryKey(id);
    }
}
